package cn.itsource.exam.mapper;

import cn.itsource.exam.domain.Role;
import cn.itsource.exam.query.RoleQueryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper {
    void deleteRole(Long roleId) ;

    //批量删除
    void batchDeleteRole(Long[] roleIds);

    void insertRole(Role role);

    void updateRole(Role role);

    Role selectRoleByRoleId(Long roleId);

    List<Role> selectRoleList(RoleQueryVo roleQueryVo);

    Role selectRoleByRoleName(String name);

    Integer selectCount(RoleQueryVo roleQueryVo);

    void insertUserRole(@Param("userId") Long userId, @Param("roleId") int roleId);
}
